hysop.backend.device.opencl.operator.enstrophy module¶
- class hysop.backend.device.opencl.operator.enstrophy.OpenClEnstrophy(**kwds)[source]¶
Bases:
EnstrophyBase
,OpenClSymbolic
Initialize a enstrophy operator operating on CartesianTopologyDescriptors.
- vorticity: Field
Input continuous vorticity field.
- enstrophy: ScalarParameter
Enstrophy scalar output parameter.
- rho: Field, optional
Input continuous density field, if not given, defaults to 1.0 on the whole domain.
- rho_0: float, optional
Reference density, defaults to 1.0.
- WdotW: Field, optional
Output continuous field, will contain W.W (term before integration). If WdotW is given, WdotW will contain W.W else this will be a temporary field only usable during this operator’s apply method. Should have nb_components=1 and the same domain and discretization as the vorticity.
- variables: dict
dictionary of fields as keys and topologies as values.
- kwds:
Keywords arguments that will be passed towards implementation poisson operator __init__.
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- setup(work)[source]¶
Setup temporary buffer that have been requested in get_work_properties(). This function may be used to execute post allocation routines. This sets self.ready flag to True. Once this flag is set one may call ComputationalGraphNode.apply() and ComputationalGraphNode.finalize().
Automatically honour temporary field memory requests.